package com.wzcl.app.service;

import com.wzcl.app.dao.model.ActivityRule;
import com.wzcl.app.dao.model.AppUser;
import com.wzcl.app.model.common.MyPage;
import com.wzcl.app.model.dto.ActivityRuleDto;

import java.util.List;
import java.util.Map;

public interface ActivityRuleService extends BaseService<ActivityRule, ActivityRuleDto>{
    ActivityRule addActivityRule(ActivityRuleDto activityRuleDto);

    ActivityRule delActivityRuleById(Integer id);

    void delActivityRuleByActivityId(Integer id);

    ActivityRule updateActivityRule(ActivityRuleDto activityRuleDto);

    ActivityRule getActivityRuleById(Integer id);

    List<ActivityRule> getActivityRuleList(ActivityRuleDto activityRuleDto);

    List<ActivityRule> getActivityRuleListByActivityId(Integer activityId);

    MyPage<ActivityRule> getActivityRulePage(ActivityRuleDto activityRuleDto);

    Boolean checkRule(AppUser user, ActivityRule rule, Map<String, Object> data);

    Long countByGroupId(Integer id);
}
